#!/bin/bash

echo 'run maven from docker --------'
docker run --rm \
 -v $(pwd):/build \
 -v /tmp/m2:/root/.m2 \
 maven:3-jdk-8-alpine \
 mvn clean package --settings /build/maven-aliyun.xml -f /build/pom-jar.xml


#run test
docker run --rm  --net=host -v $(pwd):/build  openjdk:8-alpine  java -jar /build/target/hello-world.jar
